﻿using System;
using System.Collections.Generic;
using System.Web.Configuration;

namespace DataObject
{
    public class Constants
    {
        public static string EVENT_URL = WebConfigurationManager.AppSettings["SiteURL"];

        public static readonly DateTime MinDate = new DateTime(1990, 1, 1);
        public static readonly DateTime MaxDate = new DateTime(2100, 1, 1);
        public const string DATETIME_SEARCH_FORMAT = "MM/dd/yyyy";
        public const int MAX_UPLOAD_MEMBER = 30;

        public const string DATA_CACHE_CATEGORY = "data";
        public const string DETAILS_CACHE_CATEGORY = "details";
        public const string QA_CACHE_CATEGORY = "qa";
        public const string CONFIG_CACHE_CATEGORY = "qa";
        public const string LIST_CACHE_CATEGORY = "list";
        public const string VOTE_CACHE_CATEGORY = "vote";
        public const string COMMENT_CACHE_CATEGORY = "comment";
        public const string USER_CACHE_CATEGORY = "users";
        public const string PHOTO_CACHE_CATEGORY = "photo";

        public const long DATA_CACHE_EXPIRE = 108000;
        public const long DATA_CACHE_EXPIRE_VOTE = 300;
        public const long _10second = 10;
        public const long _30second = 30;
        public const long _1min = 60;
        public const long _5min = 300;
        public const long _10min = 600;
        public const long _15min = 900;
        public const long _30min = 1800;
        public const long _120min = 7200;
        public const long _1day = 86400;

        /// <summary>
        /// 30- Day
        /// </summary>
        public const long _DefaultCacheExpire = 864000;

        public class ManagerCacheGroup
        {
            public const string News = "News";
            public const string User = "User";
            public const string Config = "Config";
            public const string Vote = "Vote";
            public const string Photo = "Photo";
            public const string QA = "QA";
            public const string Data = "Data";
            public const string Highlight = "Highlight";
        }

        public static readonly Dictionary<string, int> ListOrderType = new Dictionary<string, int>
                                                                           {
                                                                               {"moi-nhat", 1},
                                                                               {"vote", 2},
                                                                               {"ten", 3}
                                                                           };

        public class RefKey
        {
            public const string LockVote = "LockVote";
            public const string LockRegister = "LockRegister";
            public const string LockUpload = "LockUpload";
            public const string LockEdit = "LockEdit";
            public const string CurrentRound = "CurrentRound";
            public const string MemberBreakCache = "MemberBreakCache";
            public const string StartContest = "StartContest";
            public const string CheatVote = "CheatVote";
            public const string VoteDisplay = "VoteDisplay";
            public const string TimelineDisplay = "TimelineDisplay";
            public const string LockClone = "LockClone";
            public const string EmailClone = "EmailClone";
            public const string BannerHome = "BannerHome";
            public const int LockOff = 0;
            public const int LockOn = 1;
        }

        public class Table_News
        {
            public const string TableName = "News";
            public const string News_ID = "News_ID";
            public const string Cat_ID = "Cat_ID";
            public const string News_Title = "News_Title";
            public const string News_Sapo = "News_Sapo";
            public const string News_Subtitle = "News_Subtitle";
            public const string News_Image = "News_Image";
            public const string News_ImageHomePage = "News_ImageHomePage";
            public const string News_Content = "News_Content";
            public const string News_Status = "News_Status";
            public const string News_Type = "News_Type";
            public const string News_UserID = "News_UserID";
            public const string News_HomePageFocus = "News_HomePageFocus";
            public const string News_ListFocus = "News_ListFocus";
            public const string News_BoxFocus = "News_BoxFocus";
            public const string News_PenName = "News_PenName";
            public const string News_Video = "News_Video";
            public const string News_VideoTitle = "News_VideoTitle";
            public const string News_PublishDate = "News_PublishDate";
            public const string News_CreatedDate = "News_CreatedDate";
            public const string News_EditedDate = "News_EditedDate";
            public const string News_ApprovedDate = "News_ApprovedDate";
            public const string News_CreatedBy = "News_CreatedBy";
            public const string News_EditedBy = "News_EditedBy";
            public const string News_ApprovedBy = "News_ApprovedBy";
            // customize
            public const string Url = "Url";
            public const string EncodeTitle = "EncodeTitle";
            public const string DisplayPublishDate = "DisplayPublishDate";
            public const string OtherNewsTitle = "OtherNewsTitle";
            public const string DisplayPublishOnlyDate = "DisplayPublishOnlyDate";
            public const string DisplayPublishOnlyTime = "DisplayPublishOnlyTime";
            public const string SortUrl = "SortUrl";
            public const string EncodedBase64Title = "EncodedBase64Title";
        }

        public class Table_Tag
        {
            public const string TableName = "Tag";
            public const string TagId = "TagId";
            public const string Name = "Name";
            public const string CreatedOn = "CreatedOn";
            public const string EditedOn = "EditedOn";
            public const string CreatedBy = "CreatedBy";
            public const string EditedBy = "EditedBy";
        }

        public class Table_TagDetails
        {
            public const string TableName = "TagDetails";
            public const string TagDetailsId = "TagDetailsId";
            public const string Id = "Id";
            public const string TagId = "TagId";
            public const string TypeId = "TypeId";
        }

        public class Table_Members
        {
            public const string TableName = "Members";
            public const string Member_ID = "Member_ID";
            public const string Member_Name = "Member_Name";
            public const string Member_FullName = "Member_FullName";
            public const string Member_DisplayName = "Member_DisplayName";
            public const string Member_Age = "Member_Age";
            public const string Member_Gender = "Member_Gender";
            public const string Member_Birthday = "Member_Birthday";
            public const string Member_Email = "Member_Email";
            public const string Member_Address = "Member_Address";
            public const string Member_City = "Member_City";
            public const string Member_SocialID = "Member_SocialID";
            public const string Member_Tel = "Member_Tel";
            public const string Member_About = "Member_About";
            public const string Member_Job = "Member_Job";
            public const string Member_JobCompany = "Member_JobCompany";
            public const string Member_JobAddress = "Member_JobAddress";
            public const string Member_JobCity = "Member_JobCity";
            public const string Member_JobAbout = "Member_JobAbout";
            public const string Member_Avatar = "Member_Avatar";
            public const string Member_AvataMini = "Member_AvataMini";
            public const string Member_OriginalAvatar = "Member_OriginalAvatar";
            public const string Member_Status = "Member_Status";
            public const string Member_LastUpdate = "Member_LastUpdate";
            public const string Member_RegisterDate = "Member_RegisterDate";
            public const string Member_InRound = "Member_InRound";
            public const string Vote1 = "Vote1";
            public const string Vote2 = "Vote2";
            public const string Vote3 = "Vote3";
            public const string Company_ID = "Company_ID";
            public const string isCheatVote = "isCheatVote";
            public const string Member_HomePageFocus = "Member_HomePageFocus";
            public const string Member_IsSlide = "Member_IsSlide";
            public const string Member_IsOrder = "Member_IsOrder";
            public const string Member_Order = "Member_Order";
            public const string Member_IsWin = "Member_IsWin";
            public const string Member_IsClone = "Member_IsClone";
            public const string Member_CloneLevel = "Member_CloneLevel";
            public const string Member_IsLockVote = "Member_IsLockVote";
            public const string Member_AlbumTitle = "Member_AlbumTitle";
            public const string Member_AlbumDesc = "Member_AlbumDesc";
            public const string Member_ContactEmail = "Member_ContactEmail";
            public const string Member_AlbumTitle1 = "Member_AlbumTitle1";
            public const string Member_AlbumTitle2 = "Member_AlbumTitle2";
            public const string Member_AlbumTitle3 = "Member_AlbumTitle3";
            public const string Member_AlbumDesc1 = "Member_AlbumDesc1";
            public const string Member_AlbumDesc2 = "Member_AlbumDesc2";
            public const string Member_AlbumDesc3 = "Member_AlbumDesc3";
            public const string Member_OriginalAvatar2 = "Member_OriginalAvatar2";
            public const string Member_OriginalAvatar3 = "Member_OriginalAvatar3";

            // customize 
            public const string Vote = "Vote";
            public const string Url = "Url";
            public const string Age = "Age";
            public const string EncodeName = "EncodeName";
            public const string EncodedBase64Title = "EncodedBase64Title";
            public const string Avatar40x40 = "Avatar40x40";
            public const string Avatar45x45 = "Avatar45x45";
        }

        public class Table_City
        {
            public const string TableName = "City";
            public const string City_ID = "City_ID";
            public const string City_Name = "City_Name";
            public const string City_Focus = "City_Focus";
        }

        public class Table_QA
        {
            public const string TableName = "QA";
            public const string QA_ID = "QA_ID";
            public const string QA_Text = "QA_Text";
            public const string QA_CreatedDate = "QA_CreatedDate";
            public const string QA_IsFeature = "QA_IsFeature";
            public const string QA_IsHighlight = "QA_IsHighlight";
            public const string QA_IsActive = "QA_IsActive";
            public const string QA_Name = "QA_Name";
            public const string QA_Email = "QA_Email";
            public const string QA_ReplyTo = "QA_ReplyTo";

            // customize
            public const string QA_Answer = "QA_Answer";
        }

        public class Table_Photos
        {
            public const string TableName = "Photos";
            public const string Photo_ID = "Photo_ID";
            public const string Member_ID = "Member_ID";
            public const string Photo_Title = "Photo_Title";
            public const string Photo_Description = "Photo_Description";
            public const string Photo_Url = "Photo_Url";
            public const string Photo_Round = "Photo_Round";
            public const string Photo_Size = "Photo_Size";

            // customize 
            public const string EncodeTitle = "EncodeTitle";
            public const string ThumbUrl = "ThumbUrl";
            public const string RawUrl = "RawUrl";
            public const string IsMaster = "IsMaster";
            public const string Width = "Width";
            public const string Height = "Height";
        }

        public class Table_Ref
        {
            public const string TableName = "Ref";
            public const string Id = "Id";
            public const string Text = "Text";
            public const string Value = "Value";
            public const string TextValue = "TextValue";
            public const string Key = "Key";
            public const string Status = "Status";
            public const string Extension1 = "Extension1";
            public const string Extension2 = "Extension2";
        }

        public class Table_VoteLog
        {
            public const string TableName = "VoteLog";
            public const string VoteLog_ID = "VoteLog_ID";
            public const string VoteLog_FromID = "VoteLog_FromID";
            public const string VoteLog_FromName = "VoteLog_FromName";
            public const string VoteLog_FromEmail = "VoteLog_FromEmail";
            public const string VoteLog_ToID = "VoteLog_ToID";
            public const string VoteLog_ToName = "VoteLog_ToName";
            public const string VoteLog_ToEmail = "VoteLog_ToEmail";
            public const string VoteLog_Time = "VoteLog_Time";
            public const string VoteLog_XForwardedFor = "VoteLog_XForwardedFor";
            public const string VoteLog_HttpForwardedFor = "VoteLog_HttpForwardedFor";
            public const string VoteLog_RemoteAddr = "VoteLog_RemoteAddr";
            public const string VoteLog_Round = "VoteLog_Round";        
        }

    }
}
